import java.io.*;  
public class salvarReg {  
    public static void main(String[] args) {  
    	File file = new File ("C:/Eclipse (Juno x86)/workspace/testes/Arquivoteste.txt");
    	try{
    		FileWriter writer = new FileWriter(file);
    		BufferedWriter buffer = new BufferedWriter(writer);

    		buffer.write("Gravar 1a linha");
    		buffer.newLine();//quebra de linha
    		buffer.write("Gravar segunda linha");
    		buffer.flush();
    	} catch (IOException e){
    		e.printStackTrace();
    	}
    }
}